﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OA.UI.MVC.Filters
{
    public class OAExceptionAttribute : FilterAttribute, IExceptionFilter
    {
        public static Queue<Exception> Exceptions= new Queue<Exception>();
        public void OnException(ExceptionContext filterContext)
        {
            Exceptions.Enqueue(filterContext.Exception);
            //filterContext.Result = new RedirectResult("/Error.html");
            filterContext.HttpContext.Response.Redirect("/Error.html");
        }
    }
}